public class Student2 {

    public String name;
    public int age;


    public Student2() {
        this.name = name;
    }

    public Student2(String name, int age) {
        this.name = name;
        this.age = age;
        System.out.println("带两个参数的构造方法");
    }

    public void doClass(){
        System.out.println(this.name+"上课");
    }
}
